from pyparsing import *

def Test(s,l,t):
    print t.select
    print t["column"]
    print t["from1"]

aa = Keyword("select")("select")+ Combine(OneOrMore(Word(alphas)))("column") + Keyword("from")("from1")
aa = aa.setParseAction(Test)
result  = aa.parseString("select what from")
